package com.guohengspace.mq.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guohengspace.mq.dao.entity.Files;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author LEON
 * @since 2020-06-09
 */

@Mapper
public interface FilesMapper extends BaseMapper<Files> {

    /**
     * 判断文件是否已存在
     *
     * @param fileName 文件名称
     * @return boolean
     */
    boolean fileIsExist(@Param("fileName") String fileName);

    @Select("SELECT * FROM  tb_files where md5 = #{md5} ")
    Files  fileIsExistByMd5(@Param("md5") String md5);
}
